package demo1;

import java.util.Arrays;

public class test {

    public static void main(String[] args) throws CloneNotSupportedException {


        Person per1=new Person("zhangsan",12,98.4);
        Person per2= (Person)per1.clone();
        System.out.println(per2);
        System.out.println(per1.tem.Cat);
        System.out.println(per2.tem.Cat);
        System.out.println("浅拷贝==============================");
        per2.tem.Cat=9;
        System.out.println(per1.tem.Cat);
        System.out.println(per2.tem.Cat);
        System.out.println("深拷贝==============================");
        per2.tem.Cat=12;
        System.out.println(per1.tem.Cat);
        System.out.println(per2.tem.Cat);

    }

}
